package com.dairy.escape;
import com.dairy.escape.File1;
import java.io.File;
import java.io.IOException;
import java.util.Scanner;
import lombok.extern.slf4j.Slf4j;
/**
 * All rights Reserved, Designed By https://gitee.com/es-cape/escape.git
 *
 * @ProjectName: 
 * @Package: 
 * @ClassName: Main
 * @Description: $[description]
 * <p> </p>
 * @Author: escape
 * @Date: 2022/5/24
 * @Version: 
 **/
@Slf4j
public class Main {
    public static void main(String[] args) throws IOException {
      File file=new File("E://date/");
        if(!file.exists()){//如果文件夹不存在
            file.mkdir();//创建文件夹
        }

        log.info("1.编写日记");
        log.info("2.查看日记");
        Scanner sc = new Scanner(System.in);
        int in = sc.nextInt();
        while (in != 0) {
            if (in == 1) {
                File1 file2 = new File1();
                file2.setInfo();
                log.info(File1.name);
                new Write();
                Write.File_write();
            } else if (in == 2) {
                new Read();
                Read.File_read();
            }
            in=sc.nextInt();
        }
    }
}

